import request from '@/utils/request'

export const getAllApi = (customerId, invoiceCode, status, pageNum, pageSize) => {
  return request.get(`/outboundOrder?customerId=${customerId}&invoiceCode=${invoiceCode}&status=${status}&pageNum=${pageNum}&pageSize=${pageSize}`)
}

export const getPreApi = (customerId, invoiceCode, pageNum, pageSize) => {
  return request.get(`/outboundOrder/listPre?customerId=${customerId}&invoiceCode=${invoiceCode}&pageNum=${pageNum}&pageSize=${pageSize}`)
}

export const getNewApi = (customerId, invoiceCode, pageNum, pageSize) => {
  return request.get(`/outboundOrder/listNew?customerId=${customerId}&invoiceCode=${invoiceCode}&pageNum=${pageNum}&pageSize=${pageSize}`)
}

export const addApi = (data) => {
  return request.post('/outboundOrder/save', data)
}

export const updateApi = (data) => {
  return request.put('/outboundOrder/update', data)
}

export const updateByIdApi = (id) => {
  return request.put(`/outboundOrder/status/${id}`)
}
export const delApi = (ids) => {
  return request.delete('/outboundOrder/delete', { data: ids })
}